# encoding:utf-8
import requests

# client_id 为官网获取的AK， client_secret 为官网获取的SK
host = 'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=TyI9mYgpmGQbiWqPL0sG2IUS&client_secret=2szeyI9xc0TaTY8TLlpFeAbcAZdsMLuY'
response = requests.get(host)
if response:
    print(response.json())

{'refresh_token': '25.4b58aabd88bd7213d77e1f1b38a32e19.315360000.1926423229.282335-19333608',
 'expires_in': 2592000,
 'session_key': '9mzdCPa71krJEoIw07+d6LrQGOtVHB5QQqHGnVvSwlcna1GdxXtmu46xh9b6zwHS3DvZPMRioiJi3KzQepzmw4Ir4nFKTA==',
 'access_token': '24.32f54962aaea8251859c9fb328f2c137.2592000.1613655229.282335-19333608',
 'scope': 'public brain_all_scope brain_body_analysis brain_body_attr brain_body_number brain_driver_behavior brain_body_seg brain_gesture_detect brain_body_tracking brain_hand_analysis wise_adapt lebo_resource_base lightservice_public hetu_basic lightcms_map_poi kaidian_kaidian ApsMisTest_Test权限 vis-classify_flower lpq_开放 cop_helloScope ApsMis_fangdi_permission smartapp_snsapi_base smartapp_mapp_dev_manage iop_autocar oauth_tp_app smartapp_smart_game_openapi oauth_sessionkey smartapp_swanid_verify smartapp_opensource_openapi smartapp_opensource_recapi fake_face_detect_开放Scope vis-ocr_虚拟人物助理 idl-video_虚拟人物助理 smartapp_component smartapp_search_plugin', 'session_secret': 'bfecb6e515c318a82878be07d4868f13'}


